package com.ruoyi.project.rm.controller;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.project.rm.service.PostponeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Date;

@Controller
@RequestMapping("/task")
public class PostponeController {

    @Autowired
    private PostponeService postponeServiceImpl;

    @ResponseBody
    @RequestMapping("postpone/postponeInfo")
    public int postponeInfo(int taskId, int implementId, String postponeTime,String postponeDesc){

        Date date = DateUtils.parseDate(postponeTime);

        int n=postponeServiceImpl.postponeInfo(taskId,implementId,date,postponeDesc);

        return n;
    }

}
